﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace Leadyo.WebService
{
   public  interface IBaseDAL<T> where T: class,new()
    {
       //Abs
       int Insert(object obj);
       bool Delete(string key);
       bool Update(T obj);
       List<T> GetLastEntriyList();
       T GetModel(string sql);
       bool CheckNoExists(string TableName, string FieldName, string FieldValue);
       List<T> GetFirsttEntriyList();
       DataTable GetDataTableBySql(string sql);
       DataSet GetDataSetBySql(string sql);
       //T DataReaderToEntity(DataRow dr);
       int ExecuteNonQuery(string sql);
       //bool readerExists(SqlDataReader dr, string columnName);
       //DAL
       //int Insert2(object obj);
       //T GetFirstEntriy();
       //T GetLastEntriy();
    }
}
